<!--
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
   this work for additional information regarding copyright ownership.
   The ASF licenses this file to You under the Apache License, Version 2.0
   (the "License"); you may not use this file except in compliance with
   the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
-->
<!--{area,begin,head}-->
<html>
<head>
<title>${title}</title>
<link rel="stylesheet" href="./static/hama.css" />
<script type="text/javascript" src="./static/hama.js"></script>
</head>
<body>
<h1>Hama Logs(${hamaLogDir})</h1>
<hr/>
<!--{area,end,head}-->

<!--{area,begin,list0}-->
<h2>Contents of directory : ${dirName}</h2>
<div>
<form action="${targetUri}" method="get" name="goto">
<div class="block-search">
    <table>
    <tbody>
       <tr>
          <th>Goto</th>
          <td>
            <input name="dir" type="text" size="30" id="dir" value="${dirName}"/>
            <input name="go" type="submit" value="go"/>
          </td>
       </tr>
    </tbody>
    </table>
</div>
</form>
</div>
<div class="block-list-log">
<table class="full-width">
<thead>
  <tr>
    <th>filename</th>
    <th>type</th>    
    <th>size</th>
    <th>lastModified</th>
    <th>etc</th>
  </tr>
</thead>  
<tbody>
<!--{area,end,list0}-->

<!--{area,begin,list1}-->
  <tr>
    <td><a href="${targetUri}?dir=${dirName}/${fileName}">${fileName}</a></td>
    <td>${type}</td>    
    <td></td>
    <td>${fileLastModified}</td>
    <td>
      <a href="${targetUri}?dir=${dirName}/${fileName}" class="link-container"><span class="link-title">view</span></a>
    </td>
    
  </tr>
<!--{area,end,list1}-->

<!--{area,begin,list2}-->
  <tr>
    <td><span><a href="${targetUri}?dir=${dirName}&file=${fileName}&type=detail">${fileName}</a></span></td>
    <td>${type}</td>    
    <td>${fileLength}</td>
    <td>${fileLastModified}</td>
    <td>
      <a href="${targetUri}?dir=${dirName}&file=${fileName}&type=detail" class="link-container"><span class="link-title">view</span></a>
      <a href="${targetUri}?dir=${dirName}&file=${fileName}&type=tail" class="link-container"><span class="link-title">tail</span></a>
      <a href="${targetUri}?dir=${dirName}&file=${fileName}&type=download" class="link-container"><span class="link-title">download</span></a>
    </td>
  </tr>
<!--{area,end,list2}-->

<!--{area,begin,list3}-->
</tbody>
</table>
</div>
<!--{area,end,list3}-->

<!--{area,begin,detail0}-->
<h2>File : ${dirName}/${fileName}</h2>

<ul>
    <li><a href="${targetUri}?dir=${dirName}"><i>Go back to dir listing</i></a></li>
</ul>
<pre>
<!--{area,end,detail0}-->

<!--{area,begin,detail1}-->
${logLine}
<!--{area,end,detail1}-->

<!--{area,begin,detail2}-->
</pre>
<!--{area,end,detail2}-->

<!--{area,begin,logtail0}-->
<h2>File: ${dirName}/${fileName}</h2>

<div class="block-detail">
  <ul>
    <li><a href="${targetUri}?dir=${logDirName}"><i>Go back to dir listing</i></a></li>
  </ul>
</div>

<div id=search>
<form action="${targetUri}" method="get" name="goto">
  <div class="block-search">
    <table>
    <tbody>
       <tr>
          <th>line</th>
          <td>
          <input name="tailLine" type="text" width="50" id="tailLine" value="${tailLine}"/><input name="go" type="submit" value="go"/>
          <input name="type" type="hidden" value="${pageType}" />          
          <input name="dir" type="hidden" value="${dirName}" />
          <input name="file" type="hidden" value="${fileName}" />          
          </td>
       </tr>
    </tbody>
    </table>
  </div>
</form>
</div>
<div class="block-code">
<table>
<thead>
  <tr>
    <th>line</th>
    <th>code</th>
  </tr>
</thead>  
<tbody>
<tbody>
<!--{area,end,logtail0}-->

<!--{area,begin,logtail1}-->
  <tr>
    <td class="line">${lineNum}</td>
    <td class="code">${logLine}</td>
  </tr>
<!--{area,end,logtail1}-->

<!--{area,begin,logtail2}-->
</tbody>
</table>
</div>  
<!--{area,end,logtail2}-->

<!--{area,begin,tasklist0}-->
<h2>${jobName}</h2>
<div class="block-detail">
<ul>
    <li><span>Job ID : </span>${jobId}</li>
    <li><span>Status : </span>${jobStatus}</li>
</ul>
</div>

<hr>
<div class="block-list-log">
<table class="full-width">
<thead>
  <tr>
    <th>Job ID</th>
    <th>Server Name</th>
    <th>Hostname</th>
    <th>Directory</th>
    <th>Type</th>    
    <th>Etc</th>
  </tr>
</thead>  
<tbody>
<!--{area,end,tasklist0}-->

<!--{area,begin,tasklist1}-->
  <tr>
    <td><a href="/bspjob.jsp?jobid=${jobId}">${jobId}</a></td>    
    <td><a href="http://${serverName}/">${serverName}</a></td>
    <td>${hostName}</td>    
    <td><a href="http://${serverName}/logView?dir=${dirName}/${fileName}">/${dirName}</a></td>
    <td>${type}</td>    
    <td>
      <a href="http://${serverName}/logView?dir=${dirName}/${fileName}" class="link-container"><span class="link-title">view</span></a>
    </td>
  </tr>
<!--{area,end,tasklist1}-->

<!--{area,begin,tasklist2}-->
</tbody>
</table>
</div>
<!--{area,end,tasklist2}-->

<!--{area,begin,tail}-->
<hr />
<div id="footer" class="contents">
  <a href='http://hama.apache.org/'>Apache Hama</a>
</div>
</body>
</html>
<!--{area,end,tail}-->